<?php
function redirect($url) {
	header('Location: '.$url);
	die();
} 
function ds($name) {
	return LIB_DIR.'ds/ds_'.$name.'.php';
}
function conf($name) {
	global $Configuration;
	$i = 0;
	$size = $Configuration->variable_size();
	while($i < $size) {
		$var = $Configuration->variable($i);
		if($var->name() == $name) {
			return $var->value();
		}
		$i++;
	}
}
function set_conf($name, $val) {
	global $Configuration;
	$i = 0;
	$size = $Configuration->variable_size();
	while($i < $size) {
		$var = $Configuration->variable($i);
		if($var->name() == $name) {
			return $var->set_value($val);
		}
		$i++;
	}
}
function _d($t) {
	echo '<pre>';
	print_r($t);
	echo '</pre>';
}
?>
